package liuyuyang.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("tb_student")
public class Student {
    @TableId(value = "s_id", type = IdType.AUTO) // 标识主键
    private Integer sid;

    private String sname;

    private Integer age;

    private String gender;

    // @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") // 格式化时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") // 格式化时间
    private Date birthday;

    @TableField(value = "c_id")
    private Integer cid;

    @TableField(value = "city_ids")
    private String cityIds;

    @TableField(exist = false)
    private Classes classes;

    @TableField(exist = false)
    private List<Course> courseList;

    @TableField(exist = false)
    private List<Integer> courseIds;
}
